package com.yong.websocket.controller;

import com.yong.websocket.handler.UserInfoManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <pre>
 * <b>PushController</b>
 * <b>Description: </b>
 * <b>@author:wangyong2@360humi.com</b>
 * <b>Date:</b> 2021/9/23 10:55
 * <b>Copyright:</b> Copyright 2017-2019 www.360humi.com Technology Co., Ltd. All rights reserved.
 * <b>Changelog:</b>
 *   Ver          Date                    Author                  Detail
 *   ----------------------------------------------------------------------
 *   1.0   2021/9/23 10:55    wangyong2@360humi.com     new file.
 * </pre>
 */
@RestController
@RequestMapping("/web")
public class PushController {

    /**
     * @Description: 模拟测试发送信息
     * @author wy
     * @date 2021/9/23
     * @param msg
     * @return void
     */
    @GetMapping("/pushMsg")
    public void pushMessage(String msg){
        UserInfoManager.broadCastInfo(10001, "push_1001", "今天是个好日子");
    }
}
